import { request } from "../utils/request";

/**
 * 轮播图数据接口
 * @returns
 * @param GET
 */
export const bannerListAPI = () => {
  return request({
    url: "/homeBanner",
  });
};

/**
 * 每日推荐图片数据接口
 * @returns
 * @param GET
 */
export const getDayRandomAPI = () => {
  return request({
    url: "/randomWall",
  });
};

/**
 * 获取公告列表
 * @param {*} data
 * @returns
 */

export const getNoticeListAPI = (data) => {
  return request({
    url: "/wallNewsList",
    data,
  });
};

/**
 * 分类列表数据
 * @param {*} data
 * @returns
 */
export const getClassifyListAPI = (data) => {
  return request({
    url: "/classify",
    data,
  });
};

/**
 * 获取分类详情
 * @param {*} classid
 * @returns
 */
export const getClassifyDetailAPI = (data) => {
  return request({
    url: "/wallList",
    data,
  });
};

/**
 * 确认评分接口
 * @param {*} data
 * @returns
 */
export const createScoreAPI = (data) => {
  return request({
    url: "/setupScore",
    data,
  });
};

/**
 * 写入下载图片数据
 * @param {*} data
 * @returns
 */
export const apiWriteDownloadAPI = (data = {}) => {
  return request({
    url: "/downloadWall",
    data,
  });
};

/**
 * 分享单个图片详情
 * @param {*} data
 * @returns
 */
export const apiDetailWallAPI = (data = {}) => {
  return request({
    url: "/detailWall",
    data,
  });
};

/**
 *获取用户基本信息
 * @returns
 */
export const getUserInfoAPI = (data) => {
  return request({
    url: "/userInfo",
    data,
  });
};

/**
 * 我的下载接口列表数据
 * @param {*} data
 * @returns
 */
export const apiGetHistoryList = (data) => {
  return request({
    url: "/userWallList",
    data,
  });
};

/**
 * 公告列表数据
 * @param {*} data
 * @returns
 */
export const getWallNewsListAPI = (data) => {
  return request({
    url: "/wallNewsList",
    data,
  });
};

/**
 * 获取公告详情
 * @param {*} data
 * @returns
 */
export const getNewDeatilAPI = (data) => {
  return request({
    url: "/wallNewsDetail",
    data,
  });
};

/**
 * 搜索壁纸接口
 * @param {*} data
 * @returns
 */
export const apiSearchData = (data = {}) => {
  return request({
    url: "/searchWall",
    data,
  });
};
